<style>
.fui-page {
   background: {{main.syscolor || '#7c1cc9'}};
   bottom:0;
}
.btn.btn-success-o {
    background: transparent;
    color: {{main.syscolor || '#7c1cc9'}};
    border: 1px solid {{main.syscolor || '#7c1cc9'}};
}
</style>
<div class="fui-page fui-page-current">
	<div class='fui-content' style="background: {{main.syscolor || '#7c1cc9'}};padding-top:1rem;">
	<div style="padding:0.5rem">
		<div class="top" style="margin-bottom:-1.3rem;z-index:108">
			<div class="c">
				<img style="height:3rem;border-radius:100%" src="{{'../addons/jy_hnapay/images/pay.png'}}"  />
			</div>
		</div>
		<div class="fui-code" style="background: linear-gradient(#fdf5d8, #fcd7f7);border-radius: 0.5rem;padding-bottom:1rem">
		<div class="fui-line-title bold" style="padding-top:1.3rem">
			银联支付
		</div>
		<div style="padding:0 0.5rem">
		<div class='fui-cell-group' style="background:none;">
			<div class="fui-cell">
					<div class="fui-cell-label bold">支付单号</div>
					<div class="fui-cell-info">{{pagedata.paylog.tid}}</div>
			</div>
			<div class="fui-cell">
					<div class="fui-cell-label bold">订单金额</div>
					<div class="fui-cell-info bold" style="font-size:1rem"><span class='text-danger'>￥{{pagedata.paylog.fee || 0.00}}</span></div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>支付银行</div>
				<div class="fui-cell-info c000 bold">
				<div class="fui-cell-info">
					<select ng-model="pagedata.post.bankcode">
							<option value="" selected="selected">选择银行</option>
							<option ng-repeat="(value,data) in pagedata.banks" value="{{value}}" ng-selected="pagedata.post.bankcode==value">{{data}}</option>
					</select>
				</div>
				</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>银行卡号</div>
				<div class="fui-cell-info c000 bold">
				<input type="text" class='fui-input' placeholder="请输入银行卡号" ng-model="pagedata.post.cardno"/>
				</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>持卡人姓名</div>
				<div class="fui-cell-info c000 bold">
				<input type="text" class='fui-input' placeholder="请输入持卡人姓名" ng-model="pagedata.post.name"/>
				</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>证件号码</div>
				<div class="fui-cell-info c000 bold">
				<input type="text" class='fui-input' placeholder="请输入证件号码" ng-model="pagedata.post.code"/>
				</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>签约手机号</div>
				<div class="fui-cell-info c000 bold">
				<input type="text" class='fui-input' placeholder="请输入签约手机号" ng-model="pagedata.post.mobile"/>
				</div>
				<div class="fui-cell-remark noremark" style="margin-right:0"><a class="btn btn-default btn-default-o btn-sm" ng-click="pagedata.sms_code();" id="sms_code">获取验证码</a></div>
			</div>
			<div class="fui-cell must ">
				<div class="fui-cell-label">验证码</div>
				<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="请输入验证码" ng-model="pagedata.post.smscode" /></div>
			</div>
		</div>
		</div>
		<a href="javascript:;" class='btn btn-success block' style="border-radius:1rem;line-height: 3;margin-top:1rem" ng-click="pagedata.check()">确认支付</a>
		<a href="javascript:;" class='btn btn-gray block' style="border-radius:1rem;line-height: 3;" ng-click="pagedata.goback()">返回页面</a>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
scope.pagedata.check=function(){
	scope.post_json('/pay/check/',scope.pagedata.post,function(res){
		scope.message('支付成功！','','goback');
	});
}
scope.pagedata.sms_code=function(){
	var _mobile_code_sending=false;
	scope.post_json('/pay/topay/',scope.pagedata.post,function(res){
			if(res=='success'){
				_mobile_code_sending=true;
				tool.count_down(60,'sms_code','秒后重新发送',function(){
					_mobile_code_sending=false;
					$('#sms_code').text('重新发送');
				});
			}else{
				tool.message('验证码发送失败!','error');
			}
	});
}
</script>